
import java.sql.ResultSet;
import javax.swing.JTable;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Kanak
 */
public class GetFlightInfo {
    public String getdepartingcode()
    {
        return departingcode;
    }

    public String getarrivalcode() {
        return arrivalcode;
    }

     public String getdepartingon() {
        return departingon;
    }

    public String getreturningon() {
        return returningon;
    }

    public int getnumberofpassenger() {
        return numberofpassenger;
    }

    public ResultSet getQueryResults() {
        return queryResults;
    }


   // private String firstName;
    //private String lastName;
    //private String streetAddress;
    private String departingcode;
    private String arrivalcode;
    private String departingon;
    private  int numberofpassenger;
    private String returningon;

    public ResultSet queryResults;
    //private String phone;
    //private String email;
    //private String password;


    public GetFlightInfo(String departingcode,String arrivalcode,String departingon,String returningon,String numberofpassenger, JTable table)
    {
        this.departingcode = departingcode;
        this.arrivalcode=arrivalcode;
        this.returningon= returningon;
        this.numberofpassenger=Integer.parseInt(numberofpassenger);
        this.departingon= departingon;
        ConnectToDatabase connect = new ConnectToDatabase();
        queryResults = connect.flightinfo(this, table);
    }

}

